<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../node_modules/axios/dist/axios.js"></script>
</head>
<body>
<button>发送请求1</button>
<button>发送请求2</button>
<button>发送请求3</button>
<button>发送请求4</button>
</body>
<script>
    const btns = document.querySelectorAll("button");
    const oneServer = axios.create({
        baseURL:"http://zhangpeiyue.com",
        headers:{
            a:1
        }
    });
    const twoServer = axios.create({
        baseURL:"http://127.0.0.1"
    })
    btns[0].onclick = function(){
        oneServer.get("/scoreList").then(value=>{
            console.log(value);
        })
    }
    btns[1].onclick = function(){
        twoServer.get("/scoreList").then(value=>{
            console.log(value);
        })
    }
    btns[2].onclick = function(){
        oneServer.get("/scoreList").then(value=>{
            console.log(value);
        })
    }
    btns[3].onclick = function(){
        twoServer.get("/scoreList").then(value=>{
            console.log(value);
        })
    }

</script>
</html>